export const getAllData = (key, err = '获取失败') => {
  return storage
    .getAllDataForKey(key)
    .then(
      data => {
        return data;
      },
      () => {
        throw new Error(err);
      }
    );
};
export const getData = (key_id, err = '获取失败') => {
  return storage
    .load(key_id)
    .then(
      data => {
        return data;
      },
      () => {
        throw new Error(err);
      }
    );
};